#ifndef MENU_H
#define MENU_H

#include <stdlib.h>
#include <stdio.h>
#include <GL/gl.h>

#include "math.h"
#include "font.h"

typedef struct rat_rotating_menu
{
	unsigned int numentries;
	unsigned int spheredl,cylinderdl;
	unsigned int selected;
	char **entries;
	
	RatMathQuaternion lagrot;
	RatMathQuaternion currot;
} rat_rotating_menu;

rat_rotating_menu *rat_rotating_menu_create(char **entries,unsigned int numentries);
void rat_rotating_menu_destroy(rat_rotating_menu *menu);

void rat_rotating_menu_left(rat_rotating_menu *menu,float coef);
void rat_rotating_menu_right(rat_rotating_menu *menu,float coef);
void rat_rotating_menu_up(rat_rotating_menu *menu,float coef);
void rat_rotating_menu_down(rat_rotating_menu *menu,float coef);

void rat_rotating_menu_update(rat_rotating_menu *menu,float slerp_t);

RatMathQuaternion *rat_rotating_menu_true_orientation(rat_rotating_menu *menu);
RatMathQuaternion *rat_rotating_menu_lag_orientation(rat_rotating_menu *menu);

unsigned int rat_rotating_menu_selected(rat_rotating_menu *menu);

void rat_rotating_menu_render(rat_rotating_menu *menu);

#endif

